<?php
/**
 * 下载管理
**/
$title='下载管理';
include './Head.php';
?>
<?php
if(isset($_GET['qq'])) {
$qq=daddslashes($_GET['qq']);
$row=$DB->query("SELECT * FROM `pay_check` WHERE `qq`='{$qq}' limit 1")->fetch();
if($row=='')exit("<script language='javascript'>alert('授权平台不存在该QQ！');history.go(-1);</script>");
if($row['status']==0)exit("<script language='javascript'>alert('此QQ的授权已被封禁！');history.go(-1);</script>");
$authcode=$row['authcode'];
$cloud=$DB->query("SELECT * FROM `pay_cloud` WHERE `qq`='{$row['qq']}' limit 1")->fetch();
$pid=$cloud['pid'];
$key=$cloud['key'];
?>
<div class="block">
<div class="panel-body">
<li class="list-group-item"><span class="glyphicon glyphicon-stats"></span> <b>授权ＱＱ：</b> <?=$qq?>&nbsp;<a href="tencent://message/?uin=<?=$qq?>&amp;Site=授权平台&amp;Menu=yes"><img src="http://pub.idqqimg.com/wpa/images/counseling_style_52.png" border=0></a></li>
<li class="list-group-item"><span class="glyphicon glyphicon-time"></span> <b>授权代码：</b> <?=$authcode?></li>
<li class="list-group-item"><span class="glyphicon glyphicon-tint"></span> <b>云端账号：</b> <?=$pid?></li>
<li class="list-group-item"><span class="glyphicon glyphicon-tint"></span> <b>云端密码：</b> <?=$key?></li>
<li class="list-group-item"><span class="glyphicon glyphicon-list"></span> <b>下载类型：</b> 
              <a href="Download.php?my=installer&authcode=<?=$authcode?>&sign=<?=$sign?>&r=<?=time()?>&qq=<?=$qq?>" class="btn btn-xs btn-success">完整安装包</a>&nbsp;
              <a href="Download.php?my=updater&authcode=<?=$authcode?>&sign=<?=$sign?>&r=<?=time()?>&qq=<?=$qq?>" class="btn btn-xs btn-primary">更新包</a>
</li>
</ul>
<div class="panel-footer">
<span class="glyphicon glyphicon-info-sign"></span> 新购用户请下载完整安装包！
</div>
</div>
<?php }else{?>
<div class="block">
<div class="panel-body">
<form action="./Downfile.php" method="GET" class="form-horizontal" role="form">
<div class="input-group">
<span class="input-group-addon">ＱＱ</span>
<input type="text" name="qq" value="<?=@$_GET['qq']?>" class="form-control" placeholder="购买授权的QQ" autocomplete="off" autofocus="autofocus" required/>
</div><br/>
<div class="form-group">
<div class="col-sm-12"><input type="submit" value="获取下载地址" class="btn btn-primary form-control"/></div>
</div>
</form>
</div>
</div>
<?php }?>

    </div>
  </div>